#ifndef GOODS_H
#define GOODS_H

#include <QMainWindow>
//#include <QSqlTableModel>
#include <QSqlRelationalTableModel>
#include <QSpinBox>
#include<QFileDialog>
#include<QBuffer>
#include<QSqlQuery>
#include <QSqlDatabase>
#include <QSqlTableModel>
#include <QTime>
#include <QPixmap>

namespace Ui {
class goods;
}

class goods : public QMainWindow
{
    Q_OBJECT

public:
    explicit goods(QWidget *parent = nullptr);
    void onTableSelectChange(int row);
    void showPhoto();
    void oninformationChange();
//    void on_name_out_currentIndexChanged(int index);

    ~goods();

private slots:
    void on_ok_clicked();

    void on_SearchAll_clicked();

    void on_SearchAll_2_clicked();

    void on_add_clicked();

    void on_delete_2_clicked();

    void on_search_clicked();

    void on_search_2_clicked();

    void on_revoke_clicked();

    void on_refresh_clicked();

    void on_uploadPicture_clicked();

    void on_instock_clicked();

    void on_tableView_2_clicked(const QModelIndex &index);

    void on_name_out_currentIndexChanged(int index);

    void on_outstock_clicked();

private:
    Ui::goods *ui;
    QSqlTableModel *model1;
    QSqlTableModel *model2;
    QImage myPicImg;
};

#endif // GOODS_H
